<extend name="../layout" />

<block name="main_content">
    <div class="row-fluid paper-edit-box">
        <div class="span3">
            <div class="widget-box">
                <div class="widget-title"> <span class="icon"><i class="icon-th"></i></span>
                    <h5>{:L('returns_detail')}</h5>
                </div>
                <div class="widget-content nopadding">
                    <table class="table table-bordered table-striped with-check">
                        <tbody>
                            <tr>
                                <th style="width:80px;">ID</th>
                                <td>{$thePaper.id}</td>
                            </tr>
                            <tr>
                                <th>{:L('subject')}</th>
                                <td>{$thePaper.subject}</td>
                            </tr>
                            <tr>
                                <th>{:L('create_dateline')}</th>
                                <td>{$thePaper.dateline_lang}</td>
                            </tr>
                            <tr>
                                <th>{:L('status')}</th>
                                <td><span class="badge badge-{$thePaper.processes.currentNode.status_class}">{$thePaper.processes.currentNode.status_text}</span></td>
                            </tr>
                            <tr>
                                <th>{:L('sponsor')}</th>
                                <td>{$thePaper.sponsor}</td>
                            </tr>
                            <tr>
                                <th>{:L('stock')}</th>
                                <td>{$thePaper.stock_name}</td>
                            </tr>
                            <tr>
                                <th>{:L('memo')}</th>
                                <td>{$thePaper.memo}</td>
                            </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
        <div class="span9">
            <div class="widget-box">
                <div class="widget-title"> <span class="icon"><i class="icon-th"></i></span>
                    <h5>{:L('returns_detail')}</h5>
                    <a href="{:U('index')}" class="label label-info">{:L('go_back')}</a>
                </div>
                <div class="widget-content nopadding">
                    <table class="table table-bordered table-striped with-check">
                      <thead>
                        <tr>
                            <th style="width:70px;">{:L('id')}</th>
                            <th>{:L('goods')}</th>
                            <th>{:L('color')}</th>
                            <th>{:L('standard')}</th>
                            <th>{:L('num')}</th>
                        </tr>
                      </thead>
                      <tbody id="stockin_table">
                          <volist name="list" id="t">
                              <tr rowid="{$t.id}">
                                  <td>{$t.factory_code_all}</td>
                                  <td>{$t.goods_name}</td>
                                  <td>{$t.color_name}</td>
                                  <td>{$t.standard_name}</td>
                                 <td>
                                    <if condition="$t[num] gt $t[store_num]">
                                        <span class="label label-warning" title="库存不足">{$t.num}</span>
                                    <else />
                                        {$t.num}
                                    </if>
                                  </td>
                              </tr>
                          </volist>
                      </tbody>
                      <tfoot>
                          <tr>
                              <th colspan="4">
                                  <volist name="thePaper[processes][nextActions]" id="lpn">
                                      <a href="{:U('/JXC/Returns/doWorkflow/node_id/'.$lpn[id].'/mainrow_id/'.$thePaper[id])}" class="btn btn-{$lpn.btn_class}">{$lpn.name}</a> &nbsp;
                                  </volist>
                                  <a href="javascript:history.go(-1);" class="btn btn-info">{:L('go_back')}</a>
                              </th>
                              <td colspan="3">
                                  {:L('total_num')}
                                  <span class="label label-important" id="total_num">{$thePaper.total_num}</span>
                              </td>
                          </tr>
                      </tfoot>
                    </table>
                </div>
            </div>
        </div>
    </div>
</block>
